//package cn.com.cdb.ldms.ftz.controller;
//
//import cn.com.cdb.ldms.ftz.dto.in.DeptIn;
//import cn.com.cdb.ldms.modules.system.components.ViewConfigGenerator;
//import jakarta.annotation.PostConstruct;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.Map;
//import java.util.concurrent.ConcurrentHashMap;
//
////@RestController
////@RequestMapping("/view/config")
//public abstract class ViewConfigController {
//
//    @Autowired
//    private ViewConfigGenerator configGenerator;
//
//    protected final Map<String, Class<?>> entityRegistry = new ConcurrentHashMap<>();
//
//
//    @GetMapping("/config/{entityName}")
//    public ResponseEntity<Map<String, Object>> getViewConfig(
//            @PathVariable String entityName) {
//
//        Class<?> entityClass = entityRegistry.get(entityName.toLowerCase());
//        if (entityClass == null) {
//            return ResponseEntity.notFound().build();
//        }
//
//        return ResponseEntity.ok(configGenerator.generateConfig(entityClass));
//    }
//}